package org.speed.jdk;


public class User {

	private String name;
	
	private String password;
	
	public User(UserBuilder builder) {
		this.name = builder.name;
		this.password = builder.password;
	}
	
	
	
	public String getName() {
		return name;
	}



	public void setName(String name) {
		this.name = name;
	}



	public String getPassword() {
		return password;
	}



	public void setPassword(String password) {
		this.password = password;
	}



	static class UserBuilder {
		
		private String name;
		private String password;
		
		public UserBuilder name(String name) {
			this.name = name;
			return this;
		}
		
		public UserBuilder password(String password) {
			this.password = password;
			return this;
		}
		
		
		public User build() {
			return new User(this);
		}
	}
	
}
